<?php

/**
 * Description of Formmetadata
 *
 * @author DENY PRASETIA TW
 * http://denyprasetiatw.blogspot.com/
 * Created Feb 11, 2012 - 7:20:44 PM
 */

if($this->session->userdata('s_hakakses') != "1"){
    redirect();
} else if($this->session->userdata('s_hakakses') == NULL){
    redirect();
}

$sifat = array(
    1 => 'Rahasia', 
    2 => 'Penting',
    3 => 'Segera',
    4 => 'Biasa'
);

$kategori = array(
    1 => 'Surat Masuk',
    2 => 'Surat Keluar'
);

$datestring = "%Y-%m-%d";

?>

<div align="center">
    <h1>Form Metadata</h1>
    <?php echo form_open('Site/validasiRegistrasiPegawai'); ?>
    <table border="0" cellpadding="5">
      <tr>
        <td width="120"></td>
        <td width="8"></td>
        <td></td>
      </tr>
      <tr>
        <td>NOSURAT</td>
        <td>:</td>
        <td><?php echo form_input('').form_error(''); ?></td>
      </tr>
      <tr>
        <td>BIDANG</td>
        <td>:</td>
        <td>
            <?php 
            echo form_dropdown().form_error('');
            ?>
        </td>
      </tr>
      <tr>
        <td>SUB BIDANG</td>
        <td>:</td>
        <td>
            <?php 
            echo form_dropdown().form_error('');
            ?>
        </td>
      </tr>
      <tr>
        <td>KATEGORI</td>
        <td>:</td>
        <td><?php echo form_dropdown('i_kategori', $kategori).form_error(''); ?></td>
      </tr>
      <tr>
        <td>IDPEGAWAI</td>
        <td>:</td>
        <td><?php echo form_input('', $this->session->userdata('s_idpegawai'))."<br><i>".$this->session->userdata('s_namapegawai')."</i><br>".form_error(''); ?></td>
      </tr>
      <tr>
        <td>IDSIIFAT</td>
        <td>:</td>
        <td><?php echo form_dropdown('i_sifat',$sifat).form_error(''); ?></td>
      </tr>
      <tr>
        <td>NOURUT</td>
        <td>:</td>
        <td><?php echo form_input('').form_error(''); ?></td>
      </tr>
      <tr>
        <td>MASUK/KELUAR</td>
        <td>:</td>
        <td><?php echo form_input('', mdate($datestring)).form_error(''); ?></td>
      </tr>
      <tr>
        <td>TANGGAL SURAT</td>
        <td>:</td>
        <td><?php echo form_input('', mdate($datestring)).form_error(''); ?></td>
      </tr>
      <tr>
        <td>ASALSRT</td>
        <td>:</td>
        <td><?php echo form_input('').form_error(''); ?></td>
      </tr>
      <tr>
        <td>RINGKASAN</td>
        <td>:</td>
        <td>
            <?php 
            $p_ringkasan = array(
                'name' => 'username',
                'cols' => '45',
                'rows' => '4'
            );
            echo form_textarea($p_ringkasan).form_error(''); 
            ?>
        </td>
      </tr>
      <tr>
        <td>LAMPIRAN</td>
        <td>:</td>
        <td>
            <?php 
            $p_lampiran = array(
                'name' => 'username',
                'cols' => '45',
                'rows' => '4'
            );
            echo form_textarea($p_lampiran).form_error('');
            ?>
        </td>
      </tr>
      <tr>
        <td>PENGOLAHAN</td>
        <td>:</td>
        <td><?php
            $p_pengolah = array(
                'name' => 'username',
                'cols' => '45',
                'rows' => '4'
            );
            echo form_textarea($p_pengolah).form_error('');
            ?>
        </td>
      </tr>
      <tr>
        <td>DITERUSKAN</td>
        <td>:</td>
        <td><?php echo form_input('').form_error(''); ?></td>
      </tr>
      <tr>
        <td>DISIMPAN</td>
        <td>:</td>
        <td><?php echo form_input('').form_error(''); ?></td>
      </tr>
      <tr>
        <td>KETERANGAN</td>
        <td>:</td>
        <td><?php
            $p_keterangan = array(
                'name' => 'username',
                'cols' => '45',
                'rows' => '4'
            );
            echo form_textarea($p_keterangan).form_error(''); 
            ?>
        </td>
      </tr>
      <tr>
        <td>LEMBAR</td>
        <td>:</td>
        <td><?php echo form_input('').form_error(''); ?></td>
      </tr>
      <tr>
        <td></td>
        <td></td>
        <td><?php echo form_submit('i_registrasi', ' Save '); ?></td>
      </tr>
      <tr>
        <td></td>
        <td></td>
        <td></td>
      </tr>
    </table>
    <?php echo form_close(); ?>
</div>
